package com.shop.dingdongshoppingapi.controller;

import com.shop.dingdongshoppingapi.service.intf.LogisticsService;
import com.shop.dingdongshoppingapi.vo.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/api/logistics/")
@Api(tags = "关于订单时间的接口")
@CrossOrigin
public class LogisticsController {
    @Resource
    private LogisticsService service;

    @GetMapping("time.do")
    public R queryTime(String name){
        return service.queryTimeByName(name);
    }

    @GetMapping("purchaseend.do")
    public R purchaseEndTime(String name){
        return service.setPurchaseEndTime(name);
    }
}
